#ifndef UNICODE_HEADER
#define UNICODE_HEADER

// this header needs
#include <stdio.h>
#include "../ARRAY.h"
#include "ASCII.h" // Unicode is a superset of ASCII

// https://home.unicode.org/
// will represent unicode characters as an umax
typedef umax unicd_int;

// unicode has different memory representations depending
// on the encoding (UTF8, UTF16, UTF32, etc) but the integer
// representation is the same for all encodings this header
// includes functions to deal only with the integer representation

// unicode range
#define MIN_UNICD_INT 0x000000
#define MAX_UNICD_INT 0x1FFFFF
#define INV_UNICD_INT 0xFFFFFF
#define INV_UNICD_INT_STR "[INV_UNICD_INT]"

// this encoding inherits the ASCII table characters

// table definitions
#define UNICD_ASCII_INT_CTRL_CHARS_START  0x00
#define UNICD_ASCII_INT_CTRL_CHARS_END    0x19
#define UNICD_ASCII_INT_PRINT_CHARS_START 0x20
#define UNICD_ASCII_INT_PRINT_CHARS_END   0x7F
#define UNICD_ASCII_INT_COMMA             0x2C
#define UNICD_ASCII_INT_NEWLN             0xA0
#define UNICD_ASCII_INT_WHITESPACE_LENGTH 6
unicd_int * UNICD_ASCII_INT_WHITESPACE = ASCII_INT_WHITESPACE;

#define UNICD_ASCII_INT_NUMBER_BEGIN 0
#define UNICD_ASCII_INT_NUMBER_HEX_UPPER_BEGIN 10
#define UNICD_ASCII_INT_NUMBER_HEX_LOWER_BEGIN 16
#define UNICD_ASCII_INT_NUMBER_PMDX_BEGIN 22
#define UNICD_ASCII_INT_NUMBER_LENGTH 26
unicd_int * UNICD_ASCII_INT_NUMBER = ASCII_INT_NUMBER;

// checking
bool check_unicd_int(unicd_int ch);
// printing
byte print_unicd_int(unicd_int ch);
// comparing
bool unicd_int_equal(void * unicd1, void * unicd2);


#include "UNICD.c"

#endif // UNICODE_HEADER
